package com.tql.mall.product.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tql.mall.model.product.SpuSaleAttr;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: tyk
 * @Date: 2023/5/22 14:10
 * @Description:
 */
@Mapper
public interface SpuSaleAttrMapper extends BaseMapper<SpuSaleAttr> {
    /**
     * 根据spuId查询销售属性和销售属性值集合
     */
    List<SpuSaleAttr> selectSpuSaleAttrList(Long spuId);

    /**
     * 根据skuId和spuId获取销售属性数据
     */
    List<SpuSaleAttr> selectSpuSaleAttrInfoList(@Param("skuId") Long skuId, @Param("spuId") Long spuId);
}
